<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>
<html>
 <head>
    <title>PI单号报表</title>
	<%@ include file="/common/meta.jsp" %>
	<script src="${ctx}/js/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
	<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
	<script type="text/javascript">
		var basic_Url="${ctx}/logic/Reports";
		var basic_WUrl="/logic/Reports";
		var basic_Title="PI单号报表";
		var grid;
		function createSearch(){
			init(1,8,'80,100,80,100,80,100,80,100','5%');
			//第一行的数据
			addCommon(0,0,"lable","PI单号：");
			addCommon(0,1,"txtlike","zd002PiCode");
		}
		
		function searchAP(){
			multipleSearch("#table1",true,"",basic_Url+"/picodereportlist.do");
		}
		document.onkeydown=keyListener;   
		function keyListener(e){   
		    e = e ? e : event;  
		    if(e.keyCode == 13){   
		    	searchAP();
		    }   
		}  	
		$(function(){
			grid = $("#table1").ligerGrid({
		        columns: [
		                  { display: '销售单号', name: 'zd001FormCode', width: 100 },
		                  { display: 'PI单号', name: 'zd002PiCode', width: 100 },
		                  { display: '客户名称', name: 'zd006CustomerName', width: 120},
		                  { display: '业务员', name: 'zd022SalesMan', width: 100},
		                  { display: '产品编码', name: 'materialsCode', width:100},
		                  { display: '产品名称', name: 'materialsName', width:100},
		                  { display: '产品型号', name: 'materialsModel', width: 100},
		                  { display: '产品单位', name: 'materialsUnit', width:120},
		                  { display: '销售订单数量', name: 'salesQuantity', width:120},
		                  { display: '生产计划单号', name: 'proPlanCode', width:80},
		                  { display: '计划数量', name: 'planQuantity', width: 120},
		                  { display: '生产入库单', name: 'proStorInCode', width: 100},
		                  { display: '生产入库数量', name: 'rkQuantity', width: 100},
		                  { display: '销售出库单', name: 'proStorOutCode', width: 100},
		                  { display: '销售出库数量', name: 'ckQuantity', width: 100}
		                  ],
		                  enabledEdit: true,
		                  usePager: true, rownumbers: true, 
		                  pageSize:15,
		                  pageSizeOptions :[15,25,35],
		                  url:basic_Url+"/picodereportlist.do",
		                  width: "100%", height:'100%',
		                  enabledSort:false
		                  });
			$("#pageloading").hide();
			});
		function exportExcel(){
		   	var filtersStr = generateCondition();
			var path = basic_Url+"/picodereportExcel.do?filters="+filtersStr+"&_search=true";
			window.open(path,"_blank");
		}
		</script>
	 
  </head>
 <body style="padding:10px" onload="createSearch()">  
       <div id="layout1">

          <div id="pageHeader" class="pageHeader">
               <div class="searchBar" id="multipleSearchDialog">
	                <table class="table" width="100%" id="searchHeader" >  
                        <tbody id="newbody">
                        </tbody>
 	                </table>
                    <div class="subBar">
			             <ul>
			              <li><div class="buttonActive"><div class="buttonContent"><button type="submit" id="btnSearch" onclick="exportExcel()">导出Excel</button></div></div></li>
				             <li><div class="buttonActive"><div class="buttonContent"><button type="submit" id="btnSearch" onclick="searchAP()">查询</button></div></div></li>
				             <li><a class="button" onclick="clearSearch()"><span>重置</span></a></li>
			             </ul>
	                </div>
               </div>
          </div>
      </div>
      <div position="center" id="table1">
      </div>
      <div class="clear"></div>
    </body>
</html>